package com.example.receiver.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author 奶茶
 * Created by on 2018/9/4 16:14.
 */
@Component
public class Messagereceiver {

    @RabbitListener(queues="topic.message")
    public void processMessage(String message){
        System.out.println("Receive Message:"+ message);
    }

    @RabbitListener(queues="topic.messages")
    public void processMessages(String message){
        System.out.println("Receive Message:"+ message);
    }

    @RabbitListener(queues="fanout.A")
    public void processA(String message) {
        System.out.println("ReceiveA Message:"+message);
    }



    @RabbitListener(queues="fanout.B")
    public void processB(String message) {
        System.out.println("ReceiveB Message:"+message);
    }
    @RabbitListener(queues="fanout.C")
    public void processC(String message) {
        System.out.println("ReceiveC Message:"+message);
    }

}
